<div class="bjui-pageHeader">
<form id="pagerForm" data-toggle="ajaxsearch" action="__URL__/settlement" method="post">
    <input type="hidden" name="pageSize" value="{$numPerPage}">
    <input type="hidden" name="pageCurrent" value="{$_REQUEST['pageNum']|default=1}">
         <div class="bjui-searchBar">
                 <label>订单号/借款人：</label><input type="text" value="{$_REQUEST['keys']}" name="keys" class="form-control" size="12" />
                <label>订单状态：</label>
                 <select name='cash_order' data-toggle='selectpicker'>
                 <option value='4' <if condition="4 EQ $_REQUEST['cash_order']">selected</if>>未还款</option>
                 <option value='5' <if condition="5 EQ $_REQUEST['cash_order']">selected</if>>已还款</option>
                </select>&nbsp;
             <button type="submit"  class="btn-default" data-icon="search">查询</button>
              <a class="btn btn-orange" href="javascript:;" onclick="$(this).navtab('reloadForm', true);" data-icon="undo">清空查询</a>
              <php>if(display(CONTROLLER_NAME.'/del')){</php><span style="float:right;" ><a href="__URL__/del/navTabId/{:CONTROLLER_NAME}" class="btn btn-red" data-toggle="doajax" data-confirm-msg="确定要清理吗？" data-icon="remove">清理</a></span><php>}</php>
              <span><a class="btn btn-orange" href="javascript:;" onclick="$(this).navtab('reloadForm', true);" data-icon="undo">刷新</a>&nbsp&nbsp&nbsp&nbsp
        </div>  
</form>
</div>

<div class="bjui-pageContent tableContent">
     <table data-toggle="tablefixed" data-width="100%" data-layout-h="0" data-nowrap="true">
        <thead>
            <tr>
            <th width="30" height="30"></th>
            <th data-order-direction='desc' data-order-field='order_id'>订单号</th>
            <th>用户姓名</th>
            <th>用户手机号</th>
            <th>借款金额</th>
            <th data-order-direction='desc' data-order-field='days'>借款天数</th>
            <th data-order-direction='desc' data-order-field='loan_time'>借款日期</th>
            <th data-order-direction='desc' data-order-field='expire_time'>还款日期</th>
            <th data-order-direction='desc' data-order-field='repayment_amount'>应还金额(元)</th>
			<if condition="5 NEQ $_REQUEST['cash_order']">
            <th>剩余天数</th>
			</if>
            <if condition="in_array($_REQUEST['collection_time'],['2','3'])">
            <th>延期天数</th>
            <th data-order-direction='desc' data-order-field='k_time'>交易时间</th>
            </if>
            <php>if(display(CONTROLLER_NAME.'/edit')){</php><th width="30%">操作</th><php>}</php>
            <th ></th> 
            </tr>
        </thead>
        <tbody>
       <foreach name="list" item="v">
        <tr>
        <td height=25></td>
        <Td>{$v.order_id}</td>
        <Td>{$v.user_name}</td>
        <Td>{$v.mobile_phone}</td>
        <Td>{$v.money}</td>
        <Td>{$v.days} | {$v.income}</td>
        <td>{:date('Y-m-d H:i',$v['loan_time'])}</td>
        <Td>{:date('Y-m-d H:i',$v['expire_time'])}</td>
        <Td>{$v.repayment_amount}</Td>
		<if condition="5 NEQ $_REQUEST['cash_order']">
        <td>{:countDown($v['expire_time'])}</td>
		</if>
        <if condition="in_array($_REQUEST['collection_time'],['2','3'])">
        <td>{$v.over_day}</td>
        <Td>{:date('Y-m-d H:i',$v['k_time'])}</td>
        </if>
        <php>if(display(CONTROLLER_NAME.'/edit')){</php>
        <td> 
        <a href="__URL__/handle/id/{$v['order_id']}/type/1/navTabId/{:CONTROLLER_NAME}"   class="btn btn-green btn-sm" data-toggle="dialog" data-width="950" data-height="500" data-id="dialog-mask" data-mask="true" >订单处理</a>
        <a href="__URL__/continueList/order_id/{$v['order_id']}/navTabId/{:CONTROLLER_NAME}" class="btn btn-green" data-toggle="dialog" data-width="500" data-height="300" data-id="dialog-mask" data-mask="true" >交易记录</a>
        <a href="__URL__/spendwrite/order_id/{$v['order_id']}/navTabId/{:CONTROLLER_NAME}" class="btn btn-green" data-toggle="dialog" data-width="900" data-height="500" data-id="dialog-mask" data-mask="true" data-icon="plus">催收进度</a>
         <a href="__URL__/edit/id/{$v['order_id']}/navTabId/{:CONTROLLER_NAME}"   class="btn btn-green btn-sm" data-toggle="dialog" data-width="1100" data-height="800" data-id="dialog-mask" data-mask="true" >详情</a>
        <a href="__URL__/blacklist/id/{$v['uid']}/type/1/navTabId/{:CONTROLLER_NAME}/va/nopass/uid/{$v['uid']}/suffit/{$suffit}"   class="btn btn-green btn_sm" data-toggle="dialog" data-width="900" data-height="500" data-id="dialog-mask" data-mask="true">黑名单</a>
        </td>
        <php>}</php>
        <td>
        </td>
        </tr>
        </foreach>
        </tbody>
    </table>
    <div class="bjui-pageFooter">
        <div class="pages">
            <span>共 {$totalCount} 条  每页 {$numPerPage} 条</span>
        </div>
        <div class="pagination-box" data-toggle="pagination" data-total="{$totalCount}" data-page-size="{$numPerPage}" data-page-current="{$currentPage}">
      </div>
</div>
</div>